package com.fg.pro.model.trade.dto;

import lombok.Data;

import java.util.List;

@Data
public class GmSupplierDto {

    @Data
    public class GmSupplierRequest{

        public Page paging;

        public GmSupplierRequest gmSupplierRequest(int limit) {
            Page page = new Page();
            page.setLimit(limit);
            GmSupplierRequest gmSupplierRequest = new GmSupplierRequest();
            gmSupplierRequest.setPaging(page);
            return gmSupplierRequest;
        }

        @Data
        public class Page{
            public int limit;
        }
    }


    @Data
    public class GmSupplierReponse{

        public List<GmSupplierData> suppliers;

        @Data
        public class GmSupplierData{
            public Long supplier_id;
            public Long create_time;
            public Long update_time;
            public Long group_id;
            public String name;
            public Integer credit_type;
            public String customized_code;
            public Long warehouse_id;
            public Long relation_group_id;
            public Integer supplier_type;
            public Attrs attrs;
            @Data
            public class Attrs{
                public China_vat_invoice china_vat_invoice;

                @Data
                public class China_vat_invoice{
                    public int invoice_type;
                    public String bank_name;
                    public String bank_account;
                }
            }
        }
    }
}
